﻿import mx.controls. *;
import mx.events. *;
import mx.rpc.events.ResultEvent;
import mx.rpc.http.HTTPService;
import mx.core.IUIComponent;
import mx.events.DragEvent;
import mx.managers.DragManager;
import mx.collections. *;
import mx.managers.PopUpManager;
import mx.containers.TitleWindow;
import flash.geom.Point;
import com.esri.ags.Map;
import com.esri.ags.geometry.Extent;
import com.uprr.app.tnm.model.Model;
import mx.events.ListEvent;


import com.uprr.app.tnm.events.AppEvent;
import com.adobe.serialization.json.JSON
	
// when something goes wrong for all HTTP services
private function serviceFaultHandler (event : Event) : void
{
	var errorEvent : AppEvent = new AppEvent (AppEvent.APP_ERROR);
		errorEvent.data = "Error when loading bookmarks";
		errorEvent.dispatch ();
}

// overlay map service click handler
private function itemDoubleClickHandler(event:ListEvent):void {
	//var str:String = new String(event.itemRenderer.data.id);
	var dcEvent : AppEvent = new AppEvent (AppEvent.MAPSVC_DOUBLECLICK);
		dcEvent.data = event.itemRenderer.data.id;
		dcEvent.dispatch ();
}

private function dataGridInit(event:FlexEvent):void {
	event.currentTarget.itemRenderer.properties = {doubleClickEnabled:true};
}

 
